#! /bin/sh

# execute this script from the top-level directory
HOSTNAME=`hostname`

FFLAGS='-O2 -fomit-frame-pointer -mcpu=pentiumpro'
CXXFLAGS='-O2 -fomit-frame-pointer -mcpu=pentiumpro'
CPPFLAGS='-I/opt/intel/mkl/8.0.1/include -I/opt/intel/ipp/include -I/usr/local/include' 
LDFLAGS='-L/opt/intel/mkl/8.0.1/lib/32 -L/opt/intel/ipp/sharedlib -L/usr/local/lib' 
MAKE=make

OMP_NUM_THREADS=1

export CC F77 F90 LDFLAGS CFLAGS FFLAGS CPPFLAGS CXXFLAGS MAKE OMP_NUM_THREADS

LD_LIBRARY_PATH=/opt/intel/mkl/8.0.1/lib/32:/opt/intel/ipp/sharedlib; export LD_LIBRARY_PATH

rm -rf $HOSTNAME
mkdir $HOSTNAME

( 
  cd $HOSTNAME
  ../configure --disable-single --with-f90
  make -k; make -k benchmark; make clean
  ../configure --enable-single --with-f90
  make -k; make -k benchmark; make clean
  ../configure --disable-single --with-f90
  make -k; make -k accuracy; make clean
  ../configure --enable-single --with-f90
  make -k; make -k accuracy; make clean
  make collect
)
